home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / share / Dos / VARIOS / pascal / GRAPHICS.SWG / 0003_Pupixel Procedure!.pas < prev   
Encoding:
Pascal/Delphi Source File  |  1996-02-21  |  958 b   |  30 lines

  1. {
  2.  ABA> No, it won't work, the procedure you have written, will hardly work on
  3.  ABA> it's own in standard VGA, because you do not tell the routine, in which
  4.  ABA> segment your screen memory is.
  5.  
  6.  No, i wasnt sure if it would work in SVGA mode! My friend said it should so
  7.  i put it in just in case! Now that Putpixel Procedure was the wrong one
  8.  anyway, so it wouldnt work because i left out a few things. Mainly because
  9.  that was my first ASM Putpixel Procedure and i didnt try to hard on it.
  10.  
  11.  Here is my current Putpixel pixel procedure that is for Standard VGA mode!
  12.  }
  13.  Procedure Putpixel(x,y : integer; COL : byte);
  14.  BEGIN
  15.     ASM
  16.         Push    es
  17.         mov     ax, $a000
  18.         mov     es, ax
  19.         Xor     di, di
  20.         mov     ax, [x]
  21.         mov     bx, 320
  22.         mul     bx
  23.         add     ax, [y]
  24.         mov     di, ax
  25.         mov     ah, [col]
  26.         mov     es:[di], ah
  27.         pop     es
  28.     end
  29. end;
  30.